<!--
 * @Author: your name
 * @Date: 2021-05-27 09:32:08
 * @LastEditTime: 2021-05-27 18:10:37
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \遵义\zunyi\src\components\myInput.vue
-->
<template>
  <el-input :value="value" placeholder="请输入内容" @input="fun"></el-input>
</template>

<script>
export default {
  props: {
    data: {
      type: String,
    },
  },
  model: {
    prop: "data",
    event: "chang",
  },
  data() {
    return {
      value: this.data ? this.data : "",
    };
  },
  methods: {
    fun(value) {
      this.value = value;
      this.$emit("chang", value);
    },
  },
};
</script>

<style>
</style>